package com.acegear.horizon.domain.models.jpa;

import com.acegear.horizon.domain.models.constraint.DailyFeedType;
import com.fasterxml.jackson.annotation.JsonIgnore;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * Created by wangsike on 2016/12/22.
 */
@Entity
@EntityListeners(AuditingEntityListener.class)
public class AGDailyFeed {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonIgnore
    private Long id;

    @Column
    private Long feedId;

    @Column
    private DailyFeedType feedType;

    @Column
    private Integer position;

    @CreatedDate
    @Column
    private Long createAt;

    @LastModifiedDate
    @Column
    private Long updateAt;

    public AGDailyFeed(Long feedId, DailyFeedType feedType, Integer position) {
        this.feedId = feedId;
        this.feedType = feedType;
        this.position = position;
    }

    public AGDailyFeed() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getFeedId() {
        return feedId;
    }

    public void setFeedId(Long feedId) {
        this.feedId = feedId;
    }

    public DailyFeedType getFeedType() {
        return feedType;
    }

    public void setFeedType(DailyFeedType feedType) {
        this.feedType = feedType;
    }

    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }
}
